package com.gadgets.cm01.role.service;

import com.gadgets.cm01.auth.pojo.Authority;
import com.gadgets.cm01.role.dto.RoleAuthAllocationDTO;
import com.gadgets.cm01.role.dto.RoleAuthQueryDTO;
import com.gadgets.cm01.role.pojo.RoleAuthorityRelation;
import com.gadgets.framework.common.dto.Pagination;
import com.gadgets.framework.common.exception.GadgetsServiceException;

import java.util.List;

/**
 * @author UncleXiu
 * @version V1.0.0
 * @data 2020-10-10
 * 
 */
public interface IRoleAuthAllocationService {

    /**
     * 分配菜单权限给用户
     * @param authAllocationDTO         分配信息
     * @throws GadgetsServiceException  服务异常
     */
    void allocationRoleAuth(RoleAuthAllocationDTO authAllocationDTO) throws GadgetsServiceException;

    /**
     * 撤销菜单权限对用户的分配
     * @param authAllocationDTO         分配信息
     * @throws GadgetsServiceException  服务异常
     */
    void reAllocationRoleAuth(RoleAuthAllocationDTO authAllocationDTO) throws GadgetsServiceException;

    /**
     * 查询菜单所属角色信息
     * @param queryDTO                  查询条件
     * @param pagination                分页条件
     * @return                          查询结果
     * @throws GadgetsServiceException  服务异常
     */
    List<RoleAuthorityRelation> queryAuthRoleByCondition(RoleAuthQueryDTO queryDTO, Pagination pagination) throws GadgetsServiceException;

    /**
     * 分页条件查询菜单李彪
     * @param queryDTO                  查询条件
     * @param pagination                分页条件
     * @return                          查询结果
     * @throws GadgetsServiceException  服务异常
     */
    List<Authority> queryRoleAuthInfoByCondition(RoleAuthQueryDTO queryDTO, Pagination pagination) throws GadgetsServiceException;

}
